Skip to content

fix(cloud-agent): inject prContext into codex prompts#1719

Merged
tatoalo merged 1 commit intomainfrom
fix/codex-prcontext-injection
Apr 20, 2026
Merged

fix(cloud-agent): inject prContext into codex prompts#1719
tatoalo merged 1 commit intomainfrom
fix/codex-prcontext-injection

Conversation

@tatoalo
Copy link
Copy Markdown
Contributor

@tatoalo tatoalo commented Apr 17, 2026

Problem

On Slack-originated follow-up runs the agent-server sets _meta.prContext on the prompt so the agent sees the PR review context. Claude's acp-to-sdk.ts prepends it as a text block; codex forwarded params unchanged to codex-acp and the context was silently dropped — follow-ups lost their review framing.

Changes

Prepend _meta.prContext to the prompt as a text block before forwarding to codex-acp. Keep the user_message_chunk broadcast on the original params so the injected context is not rendered as a user message in the UI.

How did you test this?

  • New unit test asserting the forwarded prompt carries the prContext prefix and the broadcast shows only the real user turn.
  • Full @posthog/agent suite green.

Copy link
Copy Markdown
Contributor Author

tatoalo commented Apr 17, 2026

@tatoalo tatoalo changed the base branch from fix/codex-broadcast-user-message to graphite-base/1719 April 20, 2026 09:24
@tatoalo tatoalo force-pushed the graphite-base/1719 branch from 4987b23 to 49e79c2 Compare April 20, 2026 09:24
@tatoalo tatoalo force-pushed the fix/codex-prcontext-injection branch from dd3a4ad to a52e1a8 Compare April 20, 2026 09:24
@graphite-app graphite-app bot changed the base branch from graphite-base/1719 to main April 20, 2026 09:25
@tatoalo tatoalo force-pushed the fix/codex-prcontext-injection branch from a52e1a8 to 37aaa82 Compare April 20, 2026 09:25
@tatoalo tatoalo merged commit 9f31016 into main Apr 20, 2026
16 checks passed
Copy link
Copy Markdown
Contributor Author

tatoalo commented Apr 20, 2026

Merge activity

@tatoalo tatoalo deleted the fix/codex-prcontext-injection branch April 20, 2026 09:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants